/**
 * Created by dllo on 18/3/29.
 */
public class Question3 {
    public static void main(String[] args) {
        //i是控制循环次数的,

        for (int i = 100; i < 1000; i++) {
            int rawi = i;
            int rawi100 = rawi / 100;//求出百位数
            rawi %= 100;//余数
            int rawi10 = rawi / 10;//求出十位数
            rawi %= 10;//个位数
            if (rawi100 * rawi100 * rawi100 + rawi10 * rawi10 * rawi10 + rawi * rawi * rawi == i) {
                System.out.println(i + "是水仙花数" );
            }


        }
    }
}

